package org.wuxinshui.boosters.designPatterns.strategy.demo2;

/**
 * 构造方法注入策略选择
 */
public class MathStrategyContextMain {

    private static final String outFormat = "当前策略-%s,策略输出结果-%s";

    public static void main(String[] args) {
        MathStrategyContext strategyContext = new MathStrategyContext(new AddStrategy());

        int result = strategyContext.executeStratgey(12, 23);

        System.out.println(String.format(outFormat, "AddStrategy", result));
    }
}
